<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var a = prompt("输入身高");
        var b = prompt("输入体重");
        var c = b / (a * a);
        if (c < 18.5) {
            alert("过轻 某些疾病和某些癌症患病率增高");
        } else if (c < 23.9) {
            alert("正常");
        } else if (c < 27.9) {
            alert("超重");
        } else if (c > 28) {
            alert("肥胖");
        } else {
            alert("超出指标了");
        }
    </script>
</head>

<body>

</body>

</html>